********************************************************************************
*                                                                              *
*               CREATE SHIFT-SHARE INSTRUMENT BASED ON IFR DATA                *
*                                                                              *
********************************************************************************

global baseyear = 2004

////////////////////////////////////////////////////////////////////////////////
//////////1) CREATE IFR ROBOT EXPOSURE TRENDS AND LINK TO FIRM-LEVEL DATA///////
////////////////////////////////////////////////////////////////////////////////

use "H:\Robots and Workers\Base files\IFR\robot_data_ifr.dta", clear


// Drop broad categories
drop if industry_ifr == "unspecified" | ///
		industry_ifr == "automotive" | ///
		industry_ifr == "chemicals" | ///
		industry_ifr == "electronics" | ///
		industry_ifr == "manufacturing" | ///
		industry_ifr == "metal"

// Drop years
drop if year < $baseyear		

// Drop if no robot data in baseyear
bysort code_ifr: egen stock_sum = total(stock*(year==$baseyear))
drop if stock_sum == 0
drop stock_sum

// Drop non-countries
drop if code_ifr == "NAM" | code_if=="YUG"
		
// Keep relevant countries only		
keep if code_ifr == "KR" | ///
		code_ifr == "TW"

qui levelsof code_ifr, local(countries)
qui foreach country in `countries' {
	nois disp "`country'"
	foreach industry in all agriculture automotive_main automotive_others automotive_parts chemicals_other communication_equipment computers construction education electrical_machinery electronic_components electronics_other food furniture glass household manufacturing_other medical_instruments metal_basic metal_machinery metal_others metal_products mining nonmanufacturing_other paper pharmaceuticals plastic plastic_chemicals semiconductors textiles utilities vehicles_other {
		
		qui foreach year in 2015 2016 2017 2018 2019 2020 2021 {
			global N = _N+1
			set obs $N
			replace year = `year' if year == . 
			//replace year2 = `year'^2 if year2 == .
			replace industry_ifr = "`industry'" if industry_ifr==""
			replace code_ifr = "`country'" if code_ifr==""
		}
		sort code_ifr industry_ifr year
		
		
		
		regress stock year if industry_ifr == "`industry'" & code_ifr=="`country'" & year >= 2010
		replace stock = _b[year] + stock[_n-1] if year == 2015 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*2 + stock[_n-2] if year == 2016 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*3 + stock[_n-3] if year == 2017 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*4 + stock[_n-4] if year == 2018 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*5 + stock[_n-5] if year == 2019 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*6 + stock[_n-6] if year == 2020 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*7 + stock[_n-7] if year == 2021 & stock == . & industry_ifr == "`industry'"
}
}	

replace stock = 0 if stock < 0 //Correct negative stock for 29/38280 observations

replace cfile_ifr = cfile_ifr[_n-1] if cfile_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace country_ifr = country_ifr[_n-1] if country_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace cname_ifr = cname_ifr[_n-1] if cname_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]

replace stock = 210000 if year == 2015 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 246000 if year == 2016 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 273000 if year == 2017 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 300000 if year == 2018 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 336000 if year == 2019 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 361000 if year == 2020 & code_ifr == "KR" & industry_ifr=="all"

replace stock = stock[_n-1]+35000 if year == 2015 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2016 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+46000 if year == 2017 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+55000 if year == 2018 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+50000 if year == 2019 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2020 & code_ifr == "JP" & industry_ifr=="all"

collapse (sum) stock, by(year industry_ifr)
sort industry_ifr year

replace stock = 0 if stock < 0
rename stock robotwwstock
save "H:\Robots and Workers\Data\IFR_shiftshare.dta", replace

// Create sales in $baseyear
use "H:\Robots and Workers\Data\ProductionStatistics.dta", clear
rename sbi93_5d sbi93
tostring sbi93, force replace
merge m:1 sbi93 using "H:\Robots and Workers\Data\ABR_SBIcrosswalk.dta", nogen keep(1 3 4 5) keepusing(sbi) update
gsort beid -year
replace sbi = sbi[_n-1] if beid==beid[_n-1]
merge m:1 sbi using "H:\Robots and Workers\Base files\IFR\crosswalk_sbi_ifr.dta", nogen keep(3)
preserve
collapse (sum) empl sales, by(industry_ifr year)
rename empl empl_ifr
rename sales sales_ifr
save "H:\Robots and Workers\Data\temp_sales.dta", replace

// Create robot exposure per worker in $baseyear
use "H:\Robots and Workers\Data\IFR_shiftshare.dta", clear
merge m:1 industry_ifr year using "H:\Robots and Workers\Data\temp_sales.dta", nogen keep(1 3)
bysort industry_ifr: egen empl$baseyear = total(empl_ifr*(year==$baseyear))
bysort industry_ifr: egen sales$baseyear = total(sales_ifr*(year==$baseyear))
g salesgrowth = sales_ifr/sales$baseyear
bysort industry_ifr: egen robotwwstock$baseyear = total(robotwwstock*(year==$baseyear))
bysort year: egen robotgrowth = total(robotwwstock*(industry_ifr=="all"))
su robotgrowth if year == $baseyear
replace robotgrowth = robotgrowth/r(mean)

total robotwwstock if industry!="all" & year == $baseyear
bysort industry_ifr: egen robotsnumber$baseyear = total((robotwwstock)*(year==$baseyear))

sort industry year
g robotsexposure = (robotwwstock-robotwwstock$baseyear)/empl$baseyear
g robotsexposure_tmin5 = robotsexposure[_n-5] if industry==industry[_n-5]
g robotsshiftshare = (robotsnumber * robotgrowth)/empl$baseyear
g robotsshiftshare_tmin5 = robotsshiftshare[_n-5]
save "H:\Robots and Workers\Data\IFR_shiftshare.dta", replace

restore


collapse (sum) sales, by(sbi industry_ifr)
joinby industry_ifr using "H:\Robots and Workers\Data\IFR_shiftshare.dta"

sort sbi industry_ifr year
order sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure*
keep sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure* 
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress

save "H:\Robots and Workers\Data\IFR_shiftshare.dta", replace

use H:\Robots and Workers\Data\BEID_PS.dta", clear
keep if manufacturing==1
keep if robotsfirm==0
merge m:1 sbi year using "H:\Robots and Workers\Data\IFR_shiftshare.dta", nogen keep(1 3)

foreach var in robotsshiftshare robotsshiftshare_tmin5 robotsexposure robotsexposure_tmin5 robotwwstock {
	centile `var', centile(1 99)
	replace `var'= r(c_2) if `var' > r(c_2)
}

keep beid year  sbi industry_ifr  robotsshiftshare robotsshiftshare_tmin5 robotsexposure robotsexposure_tmin5
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress
save "H:\Robots and Workers\Data\BEID_shiftshare.dta", replace


////////////////////////////////////////////////////////////////////////////////
///////////////////2) CREATE IFR ROBOT EXPOSURE TRENDS, tmin6///////////////////
////////////////////////////////////////////////////////////////////////////////

use "H:\Robots and Workers\Base files\IFR\robot_data_ifr.dta", clear


// Drop broad categories
drop if industry_ifr == "unspecified" | ///
		industry_ifr == "automotive" | ///
		industry_ifr == "chemicals" | ///
		industry_ifr == "electronics" | ///
		industry_ifr == "manufacturing" | ///
		industry_ifr == "metal"

// Drop years
drop if year < $baseyear		

// Drop if no robot data in baseyear
bysort code_ifr: egen stock_sum = total(stock*(year==$baseyear))
drop if stock_sum == 0
drop stock_sum

// Drop non-countries
drop if code_ifr == "NAM" | code_if=="YUG"
		
// Keep relevant countries only		
keep if code_ifr == "KR" | ///
		code_ifr == "TW"

qui levelsof code_ifr, local(countries)
qui foreach country in `countries' {
	nois disp "`country'"
	foreach industry in all agriculture automotive_main automotive_others automotive_parts chemicals_other communication_equipment computers construction education electrical_machinery electronic_components electronics_other food furniture glass household manufacturing_other medical_instruments metal_basic metal_machinery metal_others metal_products mining nonmanufacturing_other paper pharmaceuticals plastic plastic_chemicals semiconductors textiles utilities vehicles_other {
		
		qui foreach year in 2015 2016 2017 2018 2019 2020 2021 {
			global N = _N+1
			set obs $N
			replace year = `year' if year == . 
			//replace year2 = `year'^2 if year2 == .
			replace industry_ifr = "`industry'" if industry_ifr==""
			replace code_ifr = "`country'" if code_ifr==""
		}
		sort code_ifr industry_ifr year
		
		
		
		regress stock year if industry_ifr == "`industry'" & code_ifr=="`country'" & year >= 2010
		replace stock = _b[year] + stock[_n-1] if year == 2015 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*2 + stock[_n-2] if year == 2016 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*3 + stock[_n-3] if year == 2017 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*4 + stock[_n-4] if year == 2018 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*5 + stock[_n-5] if year == 2019 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*6 + stock[_n-6] if year == 2020 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*7 + stock[_n-7] if year == 2021 & stock == . & industry_ifr == "`industry'"
}
}	

replace stock = 0 if stock < 0 //Correct negative stock for 29/38280 observations

replace cfile_ifr = cfile_ifr[_n-1] if cfile_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace country_ifr = country_ifr[_n-1] if country_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace cname_ifr = cname_ifr[_n-1] if cname_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]

replace stock = 210000 if year == 2015 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 246000 if year == 2016 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 273000 if year == 2017 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 300000 if year == 2018 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 336000 if year == 2019 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 361000 if year == 2020 & code_ifr == "KR" & industry_ifr=="all"

replace stock = stock[_n-1]+35000 if year == 2015 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2016 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+46000 if year == 2017 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+55000 if year == 2018 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+50000 if year == 2019 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2020 & code_ifr == "JP" & industry_ifr=="all"

collapse (sum) stock, by(year industry_ifr)
sort industry_ifr year

replace stock = 0 if stock < 0
rename stock robotwwstock
save "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta", replace

// Create sales in $baseyear
use "H:\Robots and Workers\Data\ProductionStatistics.dta", clear
rename sbi93_5d sbi93
tostring sbi93, force replace
merge m:1 sbi93 using "H:\Robots and Workers\Data\ABR_SBIcrosswalk.dta", nogen keep(1 3 4 5) keepusing(sbi) update
gsort beid -year
replace sbi = sbi[_n-1] if beid==beid[_n-1]
merge m:1 sbi using "H:\Robots and Workers\Base files\IFR\crosswalk_sbi_ifr.dta", nogen keep(3)
preserve
collapse (sum) empl sales, by(industry_ifr year)
rename empl empl_ifr
rename sales sales_ifr
save "H:\Robots and Workers\Data\temp_sales.dta", replace

// Create robot exposure per worker in $baseyear
use "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta", clear
merge m:1 industry_ifr year using "H:\Robots and Workers\Data\temp_sales.dta", nogen keep(1 3)
bysort industry_ifr: egen empl$baseyear = total(empl_ifr*(year==$baseyear))
bysort industry_ifr: egen sales$baseyear = total(sales_ifr*(year==$baseyear))
g salesgrowth = sales_ifr/sales$baseyear
bysort industry_ifr: egen robotwwstock$baseyear = total(robotwwstock*(year==$baseyear))
bysort year: egen robotgrowth = total(robotwwstock*(industry_ifr=="all"))
su robotgrowth if year == $baseyear
replace robotgrowth = robotgrowth/r(mean)

total robotwwstock if industry!="all" & year == $baseyear
bysort industry_ifr: egen robotsnumber$baseyear = total((robotwwstock)*(year==$baseyear))

sort industry year
g robotsexposure = (robotwwstock-robotwwstock$baseyear)/empl$baseyear
g robotsexposure_tmin6 = robotsexposure[_n-6] if industry==industry[_n-6]
g robotsshiftshare = (robotsnumber * robotgrowth)/empl$baseyear
g robotsshiftshare_tmin6 = robotsshiftshare[_n-6]
save "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta", replace

restore


collapse (sum) sales, by(sbi industry_ifr)
joinby industry_ifr using "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta"

sort sbi industry_ifr year
order sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure*
keep sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure* 
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress

save "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta", replace

use H:\Robots and Workers\Data\BEID_PS.dta", clear
keep if manufacturing==1
keep if robotsfirm==0
merge m:1 sbi year using "H:\Robots and Workers\Data\IFR_shiftshare_tmin6.dta", nogen keep(1 3)

foreach var in robotsshiftshare robotsshiftshare_tmin6 robotsexposure robotsexposure_tmin6 robotwwstock {
	centile `var', centile(1 99)
	replace `var'= r(c_2) if `var' > r(c_2)
}

keep beid year  sbi industry_ifr  robotsshiftshare robotsshiftshare_tmin6 robotsexposure robotsexposure_tmin5
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress
save "H:\Robots and Workers\Data\BEID_shiftshare_tmin6.dta", replace





////////////////////////////////////////////////////////////////////////////////
/////3) CREATE IFR ROBOT EXPOSURE TRENDS INCLUDING HONG KONG AND SINGAPORE /////
////////////////////////////////////////////////////////////////////////////////

use "H:\Robots and Workers\Base files\IFR\robot_data_ifr.dta", clear


// Drop broad categories
drop if industry_ifr == "unspecified" | ///
		industry_ifr == "automotive" | ///
		industry_ifr == "chemicals" | ///
		industry_ifr == "electronics" | ///
		industry_ifr == "manufacturing" | ///
		industry_ifr == "metal"

// Drop years
drop if year < $baseyear		

// Drop if no robot data in baseyear
bysort code_ifr: egen stock_sum = total(stock*(year==$baseyear))
drop if stock_sum == 0
drop stock_sum

// Drop non-countries
drop if code_ifr == "NAM" | code_if=="YUG"
		
// Keep relevant countries only		
keep if code_ifr == "KR" | ///
		code_ifr == "TW" | ///
		code_ifr == "SG" | ///
		code_ifr == "HK" 
		
qui levelsof code_ifr, local(countries)
qui foreach country in `countries' {
	nois disp "`country'"
	foreach industry in all agriculture automotive_main automotive_others automotive_parts chemicals_other communication_equipment computers construction education electrical_machinery electronic_components electronics_other food furniture glass household manufacturing_other medical_instruments metal_basic metal_machinery metal_others metal_products mining nonmanufacturing_other paper pharmaceuticals plastic plastic_chemicals semiconductors textiles utilities vehicles_other {
		
		qui foreach year in 2015 2016 2017 2018 2019 2020 2021 {
			global N = _N+1
			set obs $N
			replace year = `year' if year == . 
			//replace year2 = `year'^2 if year2 == .
			replace industry_ifr = "`industry'" if industry_ifr==""
			replace code_ifr = "`country'" if code_ifr==""
		}
		sort code_ifr industry_ifr year
		
		
		
		regress stock year if industry_ifr == "`industry'" & code_ifr=="`country'" & year >= 2010
		replace stock = _b[year] + stock[_n-1] if year == 2015 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*2 + stock[_n-2] if year == 2016 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*3 + stock[_n-3] if year == 2017 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*4 + stock[_n-4] if year == 2018 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*5 + stock[_n-5] if year == 2019 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*6 + stock[_n-6] if year == 2020 & stock == . & industry_ifr == "`industry'"
		replace stock = _b[year]*7 + stock[_n-7] if year == 2021 & stock == . & industry_ifr == "`industry'"
}
}	

replace stock = 0 if stock < 0 //Correct negative stock for 29/38280 observations

replace cfile_ifr = cfile_ifr[_n-1] if cfile_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace country_ifr = country_ifr[_n-1] if country_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]
replace cname_ifr = cname_ifr[_n-1] if cname_ifr=="" & year >2014 & code_ifr == code_ifr[_n-1]

replace stock = 210000 if year == 2015 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 246000 if year == 2016 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 273000 if year == 2017 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 300000 if year == 2018 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 336000 if year == 2019 & code_ifr == "KR" & industry_ifr=="all"
replace stock = 361000 if year == 2020 & code_ifr == "KR" & industry_ifr=="all"

replace stock = stock[_n-1]+35000 if year == 2015 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2016 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+46000 if year == 2017 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+55000 if year == 2018 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+50000 if year == 2019 & code_ifr == "JP" & industry_ifr=="all"
replace stock = stock[_n-1]+39000 if year == 2020 & code_ifr == "JP" & industry_ifr=="all"

collapse (sum) stock, by(year industry_ifr)
sort industry_ifr year

replace stock = 0 if stock < 0
rename stock robotwwstock
save "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta", replace

// Create sales in $baseyear
use "H:\Robots and Workers\Data\ProductionStatistics.dta", clear
rename sbi93_5d sbi93
tostring sbi93, force replace
merge m:1 sbi93 using "H:\Robots and Workers\Data\ABR_SBIcrosswalk.dta", nogen keep(1 3 4 5) keepusing(sbi) update
gsort beid -year
replace sbi = sbi[_n-1] if beid==beid[_n-1]
merge m:1 sbi using "H:\Robots and Workers\Base files\IFR\crosswalk_sbi_ifr.dta", nogen keep(3)
preserve
collapse (sum) empl sales, by(industry_ifr year)
rename empl empl_ifr
rename sales sales_ifr
save "H:\Robots and Workers\Data\temp_sales.dta", replace

// Create robot exposure per worker in $baseyear
use "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta", clear
merge m:1 industry_ifr year using "H:\Robots and Workers\Data\temp_sales.dta", nogen keep(1 3)
bysort industry_ifr: egen empl$baseyear = total(empl_ifr*(year==$baseyear))
bysort industry_ifr: egen sales$baseyear = total(sales_ifr*(year==$baseyear))
g salesgrowth = sales_ifr/sales$baseyear
bysort industry_ifr: egen robotwwstock$baseyear = total(robotwwstock*(year==$baseyear))
bysort year: egen robotgrowth = total(robotwwstock*(industry_ifr=="all"))
su robotgrowth if year == $baseyear
replace robotgrowth = robotgrowth/r(mean)

total robotwwstock if industry!="all" & year == $baseyear
bysort industry_ifr: egen robotsnumber$baseyear = total((robotwwstock)*(year==$baseyear))

sort industry year
g robotsexposure = (robotwwstock-robotwwstock$baseyear)/empl$baseyear
g robotsexposure_tmin5 = robotsexposure[_n-5] if industry==industry[_n-5]
g robotsshiftshare = (robotsnumber * robotgrowth)/empl$baseyear
g robotsshiftshare_tmin5 = robotsshiftshare[_n-5]
save "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta", replace

restore


collapse (sum) sales, by(sbi industry_ifr)
joinby industry_ifr using "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta"

sort sbi industry_ifr year
order sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure*
keep sbi industry_ifr year robotwwstock robotsshiftshare* *robotsexposure* 
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress

save "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta", replace

use H:\Robots and Workers\Data\BEID_PS.dta", clear
keep if manufacturing==1
keep if robotsfirm==0
merge m:1 sbi year using "H:\Robots and Workers\Data\IFR_shiftshare_KR_TW_SG_HK.dta", nogen keep(1 3)

foreach var in robotsshiftshare robotsshiftshare_tmin5 robotsexposure robotsexposure_tmin5 robotwwstock {
	centile `var', centile(1 99)
	replace `var'= r(c_2) if `var' > r(c_2)
}

keep beid year  sbi industry_ifr  robotsshiftshare robotsshiftshare_tmin5 robotsexposure robotsexposure_tmin5
do "H:\Robots and Workers\Do-files\Variable labels.do"
compress
save "H:\Robots and Workers\Data\BEID_shiftshare_KR_TW_SG_HK.dta", replace
